home *** CD-ROM | disk | FTP | other *** search
- Path: news1.ucsd.edu!usenet
- From: "Eric C. Liebl" <ecl@canna.ucsd.edu>
- Newsgroups: comp.lang.c
- Subject: Keyboard buffer problems...please help!
- Date: Sat, 17 Feb 1996 21:11:35 -0800
- Organization: UC San Diego
- Message-ID: <3126B507.4052@canna.ucsd.edu>
- NNTP-Posting-Host: eliebl.extern.ucsd.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win95; I)
-
- I am looking for a C command that will flush the keyboard buffer before
- it is read. I am using Borland C/C++ 4.0 to compile my program.
- Basically, I have a do while loop with getch() initiated when kbhit is
- true...when an appropriate key is hit I update graphics, etc. in my
- program. However, if a user holds the key down the key data fills the
- keyboard buffer and I get an annoying beep and too many "moves" get
- stored up in advance.
-
- So, can anyone help me out with this? Any help would be most
- appreciated. Thanks.
-
- Eric Liebl
- ecl@canna.ucsd.edu
-